{% extends 'layout.html' %}
{% load my_tags %}
{% block content %}
{#    <div>#}
{#        <form action="" method="get" class="form-inline">#}
{#            {% csrf_token %}#}
{#            <div class="col-lg-6" style="float: right;padding: 0">#}
{#                <div class="input-group">#}
{#                    <div class="input-group-btn">#}
{##}
{#                        <select name="condition" id="" class="form-control">#}
{#                            <option value="姓名">姓名</option>#}
{#                            <option value="qq">qq</option>#}
{#                            <option value="班级类型">班级类型</option>#}
{#                            <option value="状态">状态</option>#}
{#                        </select>#}
{##}
{#                    </div>#}
{#                    <input type="text" name="sou" class="form-control"#}
{#                           aria-label="Text input with segmented button dropdown">#}
{#                </div>#}
{#                <button type="submit" class="btn btn-default">搜索</button>#}
{#            </div>#}
{#        </form>#}
{#    </div>#}
    <form action="" method="post" class="form-inline">
        {% csrf_token %}

{#        <select name="action" id="" class="form-control">#}
{#            {% if request.path_info == url %}#}
{#                <option value="multi_apply">公户转私户</option>#}
{#            {% else %}#}
{#                <option value="multi_pub">私户转公户</option>#}
{#            {% endif %}#}
{##}
{##}
{#        </select>#}
{#        <button class="btn btn-info">提交</button>#}


        <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>序号</th>
                <th>班级名称</th>

                <th>学费</th>
                <th>说明</th>
                <th>开班日期</th>
                <th>结业日期</th>
                <th>老师</th>
                <th>班级及类型</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for classlist in classlist_all %}
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ classlist }}</td>

                    <td>{{ classlist.price }}</td>
                    <td>{{ classlist.memo }}</td>
                    <td>{{ classlist.start_date }}</td>
                    <td>{{ classlist.graduate_date }}</td>
                    <td>{% for teacher in classlist.teachers.all %}
                    {{ teacher.name }}
                    {% endfor %}


                    </td>
                    <td>{{ classlist.get_class_type_display }}</td>

                 <td>
                    <a href="{% reverse_url request 'classlist_edit' classlist.id %}">
                        <button type="button" class="btn-primary btn btn-sm">编辑</button>
                                         </a>
                      <a href="{% reverse_url request 'courserecord' classlist.id %}">
                        <button type="button" class="btn-success btn btn-sm ">查看课程记录</button>
                                         </a>
                 </td>
                </tr>
            {% endfor %}

            </tbody>
        </table>
        <div style="margin-left: 40%">
            <ul class="pagination"> {{ page_html }}</ul>
        </div>

    </form>

{% endblock %}
